#ifndef _CAR_H
	#define _CAR_H
	
#include "stm32f10x.h"
#include "usart.h"
#include "display.h"

extern u32 TimingDelay;
extern u8  fate;
extern int car_id ;
extern u8 cmd_flag;
extern char ID_data[10];
extern u8 data_bit;

#define B1 GPIO_ReadInputDataBit(GPIOA, GPIO_Pin_0)
#define B2 GPIO_ReadInputDataBit(GPIOA, GPIO_Pin_8)
#define led1 GPIO_Pin_8
#define led2 GPIO_Pin_9

#define key1 1
#define key2 2

#define site_state_spare 0
#define site_state_full 1

#define state_default_showing 10
#define state_wait_tim_cmd 11
#define state_wait_fee_cmd 12
#define state_timing 13
#define state_fee_showing 14

void delay_ms(u32 time);
void all_Init(void);
void led_ctrl(u16 led,u8 status);
u8 key_scan(void);
void site_state_get(void);
void state_get(void);


#endif